<template>
	<view style="width: 372.5rpx;" @click="openDetail">
		<img :src="item.IMAGE1" :onerror="errorImg" style="width:100%">
		<view class="p-2 py-1">
			<view class="font-md">{{item.NAME}}</view>
			<text>{{item.PRESENT_PRICE}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		data(){
			return{
				 errorImg:'this.src="' + require('@/static/images/errorimg.png') + '"'
			}
		},
		props:{
			item:Object,
			type:{
				type:String,
				default:"navigateTo"
			}
		},
		methods: {
			openDetail() {
				uni[this.type]({
					url:"/pages/goods/goods?PID="+this.item.PID
				})
			}
		},
	}
</script>

<style>
</style>
